home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 December / chip-cd_2006_12.zip / 12 / Pakiet internetowy / Klienci FTP / Staff-FTP 2.91 / sftp_setup.exe / {app} / Script_help.txt < prev    next >
Text File  |  2005-05-12  |  6KB  |  186 lines

  1. Since version 2.30 Staff-FTP supports its own little scrip-language.
  2. Sure there is not much implanted, but its enough for my needs and well I may implant some 
  3. more if u guys need it.
  4.  
  5.   SELECT FTP | FTP | LOCAL | ALL | NONE | TODAY | YESTERDAY | MASK <mask>
  6.  
  7.     - select either a window (ftp, fxp, local) or the files (all, none, today-dated,
  8.       yesterday-dated)
  9.  
  10.   DESELECT MASK <mask>
  11.  
  12.     - deselect items with the mask
  13.  
  14.   LIMITSELECTION TODAY | YESTERDAY | MASK <mask>
  15.  
  16.     - limit the selection just done to only today-dated and/or yesterday-dated fieles/dirs.
  17.  
  18.   REFRESH
  19.  
  20.     - refreshes directory
  21.  
  22.   CHDIR <new directory>
  23.  
  24.     - change dir
  25.  
  26.   ADDTOQUERY
  27.  
  28.     - adds files/dirs to que
  29.  
  30.   TRANSFER
  31.  
  32.     - transfer files in que
  33.  
  34.   COMPARE SIMPLE | EXT
  35.  
  36.     - compares windows either without size (simple) or with size /ext)
  37.  
  38.   IF <option> <comparator> <value>
  39.     ...
  40.   END
  41.  
  42.     - this is a basic if-implementation for option you can use any variable you defined
  43.       or FXP.CONNECTED, FTP.CONNECTED, FTP.OK (OK means last command was successfull), FXP.OK
  44.       FTP.PWD or FXP.PWD.
  45.     - comperator can be !=, <> or =
  46.  
  47.   GOTO <label>
  48.  
  49.     - jump to a new entry point. an entrypoint must start with ":" like ":CommeHere"
  50.     - the keyword START means the 1st line of the script and END the end ohhhha ;)
  51.  
  52.   VAR <varname>=<contens>
  53.  
  54.     - define variables...looks better if u do configs with vars so the user doesnt need to go
  55.       into the code to change something
  56.  
  57.     - contens could also be...
  58.  
  59.        SELECTION = an array with the current selection of items (ftp/fxp/local)
  60.  
  61.          e.g.:
  62.          select ftp
  63.          select mask *-blahaha
  64.          var items=SELECTION
  65.  
  66.        GETPART "<variable>" "<part>" "<seperator>" = cuts parts of an other variable out
  67.  
  68.          e.g.:
  69.          var item=this is a test
  70.          var subitem=GETPART "$item" "4" " "
  71.          #subitem would be "test" then
  72.  
  73.        MIRC LASTLINE <channel> = takes last line from that channel in mirc
  74.  
  75.          e.g.:
  76.          var ll=MIRC LASTLINE #my_channel
  77.  
  78.        EXECUTE <program with parameters>
  79.  
  80.          you can then use the returncode and work with that
  81.  
  82.        FTPCMD <ftp-command>
  83.  
  84.          e.g.:
  85.          var res=ftpcmd site dupe blahaahha-blh
  86.  
  87.        some calucation like "10+5" with "-,*,/"...also "$othervar + 10" is possible
  88.  
  89.  
  90.   CONNECT <url> | SITEMANAGER <entry-name>
  91.  
  92.     - opens a connection to an ftp-server in selected window. the format
  93.       is <user>:<password>@<ip>:<port>
  94.  
  95.   DISCONNECT
  96.  
  97.     - disconnects from selected site
  98.  
  99.   MKTREE [<deep> <mask> <filename>]
  100.  
  101.     - creates a file with a tree with a max sublevel of <deep> dirs and includes all files 
  102.       with matches <mask>
  103.  
  104.   SAVEDIR [<filename>]
  105.  
  106.     - saves dir-list to file
  107.  
  108.   EXEC <filename>
  109.  
  110.     - executes a program
  111.  
  112.  
  113.   OPEN <host> <port>
  114.  
  115.     - opens a connection to a server
  116.  
  117.   LOGIN <user> <password>
  118.  
  119.     - logs into server
  120.  
  121.   SEND <string>
  122.  
  123.     - sends a site-sommand (u still must include "site" if needed)
  124.  
  125.   SET <internal variable>=<value>
  126.  
  127.     - Like VAR but modifies internal veriables. 
  128.       Right now only "SERVER" is supported. Usefull in "SiteManager -> On Connect"
  129.       when a server isnt identied right (e.g. glftpd-servers with different welcome-messages).
  130.       
  131.   MIRC <command>
  132.  
  133.     - send strings to mirc-client
  134.       e.g. "MIRC /cmd whois %IRCNICK%" will display whois-message of your login
  135.       (%IRCNICK% is an internal variable)
  136.  
  137.   WAITIRC <channel-mask> <message-mask>
  138.  
  139.     - script waits until some of that messages have been found in a channel (needs mirc32
  140.       running)
  141.  
  142.       e.g.: waitirc #my_channel1;#my_channel2 *update*;*new*
  143.  
  144.       Can also have something like...
  145.       waitirc #bluuabab hello %nick%!
  146.       this will wait + create a variable with the name nick with that contents of the irc-line.
  147.       U can imagine for what it might be usefull.
  148.  
  149.   WRITELN <text>
  150.  
  151.     - will write something to the log-screen (good for debuging/statustext)
  152.  
  153.   FOR <item-variable> in <array>
  154.     ...
  155.   END
  156.  
  157.     - an array can be created with "var x=SELECTION" or by making your own with 
  158.       ";" as seperator for your items...e.g.: "blahaha;blahaha2;labahah3"
  159.     - the for-loop will run as long as there are items in an aray and as long as they 
  160.       are not empty.
  161.     - item-variable will then become the current array-index
  162.     - attention: the window in the program will not jump into for-loops, also it will 
  163.       be performed within the program itselfe.
  164.  
  165.       e.g.:
  166.       select mask *-blhaa
  167.       var s=SELECTION
  168.       for item in $s                       #<-- the prg-indicator will stop here, but all 
  169.         writeln $item                           will be perfomed, dont worry
  170.       end
  171.  
  172. -----------------------------------
  173.  
  174.   There are some internal veriables like
  175.  
  176.   %TODAY%                        - dayted dir from today like 0913 for the 13th of sep.
  177.   %YEASTERDAY%                   - dayted dir from yesterday
  178.   %MONTH[operator][number]%      - month wich is [number] month back/before like %month-1% will be last month
  179.   %DAY[operator][number]%        - same for day
  180.   %YEAR%                         - current year
  181.   %MINUTE%                       - current minute
  182.   %HOUR%                         - current hour
  183.  
  184.   there are lots more...but i guess i have to put out some more samples to make it clear...will come.
  185.  
  186.